// $ANTLR 3.0.1 Roller.g 2008-04-03 19:34:50

package com.braincasedesigns.roller.parser.generated;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class RollerLexer extends Lexer {
    public static final int SEMI=7;
    public static final int T14=14;
    public static final int MINUS=11;
    public static final int T15=15;
    public static final int EOF=-1;
    public static final int WS=6;
    public static final int NON_ZERO=13;
    public static final int RPAREN=5;
    public static final int Tokens=17;
    public static final int LPAREN=4;
    public static final int T16=16;
    public static final int PLUS=10;
    public static final int DEE=9;
    public static final int MULTIPLY=12;
    public static final int NEWLINE=8;
    public RollerLexer() {;} 
    public RollerLexer(CharStream input) {
        super(input);
        ruleMemo = new HashMap[15+1];
     }
    public String getGrammarFileName() { return "Roller.g"; }

    // $ANTLR start T14
    public final void mT14() throws RecognitionException {
        try {
            int _type = T14;
            // Roller.g:6:5: ( 'F' )
            // Roller.g:6:7: 'F'
            {
            match('F'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end T14

    // $ANTLR start T15
    public final void mT15() throws RecognitionException {
        try {
            int _type = T15;
            // Roller.g:7:5: ( 'f' )
            // Roller.g:7:7: 'f'
            {
            match('f'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end T15

    // $ANTLR start T16
    public final void mT16() throws RecognitionException {
        try {
            int _type = T16;
            // Roller.g:8:5: ( '%' )
            // Roller.g:8:7: '%'
            {
            match('%'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end T16

    // $ANTLR start SEMI
    public final void mSEMI() throws RecognitionException {
        try {
            int _type = SEMI;
            // Roller.g:57:6: ( ';' )
            // Roller.g:57:8: ';'
            {
            match(';'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end SEMI

    // $ANTLR start DEE
    public final void mDEE() throws RecognitionException {
        try {
            int _type = DEE;
            // Roller.g:59:5: ( ( 'd' | 'D' ) )
            // Roller.g:59:7: ( 'd' | 'D' )
            {
            if ( input.LA(1)=='D'||input.LA(1)=='d' ) {
                input.consume();
            failed=false;
            }
            else {
                if (backtracking>0) {failed=true; return ;}
                MismatchedSetException mse =
                    new MismatchedSetException(null,input);
                recover(mse);    throw mse;
            }


            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end DEE

    // $ANTLR start PLUS
    public final void mPLUS() throws RecognitionException {
        try {
            int _type = PLUS;
            // Roller.g:62:6: ( '+' )
            // Roller.g:62:8: '+'
            {
            match('+'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end PLUS

    // $ANTLR start MINUS
    public final void mMINUS() throws RecognitionException {
        try {
            int _type = MINUS;
            // Roller.g:63:7: ( '-' )
            // Roller.g:63:10: '-'
            {
            match('-'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end MINUS

    // $ANTLR start MULTIPLY
    public final void mMULTIPLY() throws RecognitionException {
        try {
            int _type = MULTIPLY;
            // Roller.g:64:9: ( '*' )
            // Roller.g:64:11: '*'
            {
            match('*'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end MULTIPLY

    // $ANTLR start LPAREN
    public final void mLPAREN() throws RecognitionException {
        try {
            int _type = LPAREN;
            // Roller.g:66:8: ( '(' )
            // Roller.g:66:11: '('
            {
            match('('); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end LPAREN

    // $ANTLR start RPAREN
    public final void mRPAREN() throws RecognitionException {
        try {
            int _type = RPAREN;
            // Roller.g:67:9: ( ')' )
            // Roller.g:67:11: ')'
            {
            match(')'); if (failed) return ;

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end RPAREN

    // $ANTLR start NON_ZERO
    public final void mNON_ZERO() throws RecognitionException {
        try {
            int _type = NON_ZERO;
            // Roller.g:70:9: ( '1' .. '9' ( '0' .. '9' )* )
            // Roller.g:70:11: '1' .. '9' ( '0' .. '9' )*
            {
            matchRange('1','9'); if (failed) return ;
            // Roller.g:70:20: ( '0' .. '9' )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( ((LA1_0>='0' && LA1_0<='9')) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // Roller.g:70:21: '0' .. '9'
            	    {
            	    matchRange('0','9'); if (failed) return ;

            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);


            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end NON_ZERO

    // $ANTLR start NEWLINE
    public final void mNEWLINE() throws RecognitionException {
        try {
            int _type = NEWLINE;
            // Roller.g:72:9: ( ( '\\r' '\\n' )=> '\\r' '\\n' | '\\r' | '\\n' )
            int alt2=3;
            int LA2_0 = input.LA(1);

            if ( (LA2_0=='\r') ) {
                int LA2_1 = input.LA(2);

                if ( (LA2_1=='\n') && (synpred1())) {
                    alt2=1;
                }
                else {
                    alt2=2;}
            }
            else if ( (LA2_0=='\n') ) {
                alt2=3;
            }
            else {
                if (backtracking>0) {failed=true; return ;}
                NoViableAltException nvae =
                    new NoViableAltException("72:1: NEWLINE : ( ( '\\r' '\\n' )=> '\\r' '\\n' | '\\r' | '\\n' );", 2, 0, input);

                throw nvae;
            }
            switch (alt2) {
                case 1 :
                    // Roller.g:72:11: ( '\\r' '\\n' )=> '\\r' '\\n'
                    {
                    match('\r'); if (failed) return ;
                    match('\n'); if (failed) return ;

                    }
                    break;
                case 2 :
                    // Roller.g:73:11: '\\r'
                    {
                    match('\r'); if (failed) return ;

                    }
                    break;
                case 3 :
                    // Roller.g:74:11: '\\n'
                    {
                    match('\n'); if (failed) return ;

                    }
                    break;

            }
            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end NEWLINE

    // $ANTLR start WS
    public final void mWS() throws RecognitionException {
        try {
            int _type = WS;
            // Roller.g:77:9: ( ( ' ' | '\\t' )+ )
            // Roller.g:77:11: ( ' ' | '\\t' )+
            {
            // Roller.g:77:11: ( ' ' | '\\t' )+
            int cnt3=0;
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0=='\t'||LA3_0==' ') ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // Roller.g:
            	    {
            	    if ( input.LA(1)=='\t'||input.LA(1)==' ' ) {
            	        input.consume();
            	    failed=false;
            	    }
            	    else {
            	        if (backtracking>0) {failed=true; return ;}
            	        MismatchedSetException mse =
            	            new MismatchedSetException(null,input);
            	        recover(mse);    throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt3 >= 1 ) break loop3;
            	    if (backtracking>0) {failed=true; return ;}
                        EarlyExitException eee =
                            new EarlyExitException(3, input);
                        throw eee;
                }
                cnt3++;
            } while (true);

            if ( backtracking==0 ) {
               channel = HIDDEN; 
            }

            }

            this.type = _type;
        }
        finally {
        }
    }
    // $ANTLR end WS

    public void mTokens() throws RecognitionException {
        // Roller.g:1:8: ( T14 | T15 | T16 | SEMI | DEE | PLUS | MINUS | MULTIPLY | LPAREN | RPAREN | NON_ZERO | NEWLINE | WS )
        int alt4=13;
        switch ( input.LA(1) ) {
        case 'F':
            {
            alt4=1;
            }
            break;
        case 'f':
            {
            alt4=2;
            }
            break;
        case '%':
            {
            alt4=3;
            }
            break;
        case ';':
            {
            alt4=4;
            }
            break;
        case 'D':
        case 'd':
            {
            alt4=5;
            }
            break;
        case '+':
            {
            alt4=6;
            }
            break;
        case '-':
            {
            alt4=7;
            }
            break;
        case '*':
            {
            alt4=8;
            }
            break;
        case '(':
            {
            alt4=9;
            }
            break;
        case ')':
            {
            alt4=10;
            }
            break;
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt4=11;
            }
            break;
        case '\n':
        case '\r':
            {
            alt4=12;
            }
            break;
        case '\t':
        case ' ':
            {
            alt4=13;
            }
            break;
        default:
            if (backtracking>0) {failed=true; return ;}
            NoViableAltException nvae =
                new NoViableAltException("1:1: Tokens : ( T14 | T15 | T16 | SEMI | DEE | PLUS | MINUS | MULTIPLY | LPAREN | RPAREN | NON_ZERO | NEWLINE | WS );", 4, 0, input);

            throw nvae;
        }

        switch (alt4) {
            case 1 :
                // Roller.g:1:10: T14
                {
                mT14(); if (failed) return ;

                }
                break;
            case 2 :
                // Roller.g:1:14: T15
                {
                mT15(); if (failed) return ;

                }
                break;
            case 3 :
                // Roller.g:1:18: T16
                {
                mT16(); if (failed) return ;

                }
                break;
            case 4 :
                // Roller.g:1:22: SEMI
                {
                mSEMI(); if (failed) return ;

                }
                break;
            case 5 :
                // Roller.g:1:27: DEE
                {
                mDEE(); if (failed) return ;

                }
                break;
            case 6 :
                // Roller.g:1:31: PLUS
                {
                mPLUS(); if (failed) return ;

                }
                break;
            case 7 :
                // Roller.g:1:36: MINUS
                {
                mMINUS(); if (failed) return ;

                }
                break;
            case 8 :
                // Roller.g:1:42: MULTIPLY
                {
                mMULTIPLY(); if (failed) return ;

                }
                break;
            case 9 :
                // Roller.g:1:51: LPAREN
                {
                mLPAREN(); if (failed) return ;

                }
                break;
            case 10 :
                // Roller.g:1:58: RPAREN
                {
                mRPAREN(); if (failed) return ;

                }
                break;
            case 11 :
                // Roller.g:1:65: NON_ZERO
                {
                mNON_ZERO(); if (failed) return ;

                }
                break;
            case 12 :
                // Roller.g:1:74: NEWLINE
                {
                mNEWLINE(); if (failed) return ;

                }
                break;
            case 13 :
                // Roller.g:1:82: WS
                {
                mWS(); if (failed) return ;

                }
                break;

        }

    }

    // $ANTLR start synpred1
    public final void synpred1_fragment() throws RecognitionException {   
        // Roller.g:72:11: ( '\\r' '\\n' )
        // Roller.g:72:12: '\\r' '\\n'
        {
        match('\r'); if (failed) return ;
        match('\n'); if (failed) return ;

        }
    }
    // $ANTLR end synpred1

    public final boolean synpred1() {
        backtracking++;
        int start = input.mark();
        try {
            synpred1_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !failed;
        input.rewind(start);
        backtracking--;
        failed=false;
        return success;
    }


 

}